home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / BP70LIB / GRAF3.DOC < prev    next >
Text File  |  1993-01-15  |  2KB  |  74 lines

  1. unit graf3;
  2.  
  3.  
  4.  
  5.  
  6.  
  7. interface
  8.  
  9.  
  10.  
  11.  
  12. uses Crt,Dos,Graph,
  13.      {$IFDEF DPMI} winapi, {$endif}
  14.      generic;
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. var mousesize:longint;       { size of image behind mouse }
  24.     mouseptr:pointer;        { image behind mouse }
  25.     graffont,graffontsize,   { font used for menus etc. set by grafon. }
  26.     hrmousex,hrmousey,   { mouse x & y - graf coords - hi res vid modes }
  27.     grafdriver,grafmode,grafresult,vesa16num,bgi256num,
  28.                                             { set by initgraph in grafon }
  29.     vidmode:integer;  { vidmode is set by grafon.
  30.                         1=EGA  640x350
  31.                         2=VGA  640x480
  32.                         3=VESA 800x600
  33.                         4=VESA 1024x768
  34.                         5=VESA 1280x1024
  35.                         6=320x200 256 colors
  36.                         7=600x400 256 colors
  37.                         8=600x480 256 colors
  38.                         9=800x600 256 colors
  39.                         10=1024x768 256 colors }
  40.  
  41.  
  42. procedure grafon(fontpath:string);
  43. { initgraf with egavga, vesa16, and 256 color drivers and 10 fonts.
  44.   works in both real and protected modes. use instead of initgraf. speeds up
  45.   graphics. looks in current dir for external drivers & fonts. automatically
  46.   loads and registers all 10 stroked fonts. fontpath is directory containing
  47.   drivers and font files (''=current dir). if any command line param 1-5 is
  48.   bgidir=<dir> then uses <dir> to override fontpath. searches for
  49.   rockvid.dat file in current dir. if found reads in vidmode setting in
  50.   rockvid.dat and starts in that video mode. Otherwise it autodetects the
  51.   best mode available and starts in that video mode. Use closegraph
  52.   (in bp7 graph unit) to return to text mode. }
  53.  
  54.  
  55. procedure setvid(k:integer);
  56. { sets video to start in a specific mode. call before grafon. writes a
  57.   rockvid.dat file to the current dir, which is then found and used by
  58.   grafon. K is the video mode to start in. values for k are same as
  59.   vidmode values listed above. }
  60.  
  61. procedure initdrivers(fontpath:string; load256:boolean);
  62. { allocates memory for fonts and video drivers, loads fonts and drivers,
  63.   registers fonts and drivers. call once at program start before using the
  64.   heap and before calling grafon for the first time. fontpath is same as
  65.   in grafon. if load256=true, loads & registers 256 color driver. 256
  66.   color driver works in real mode only. }
  67.  
  68.  
  69.  
  70.  
  71. implementation
  72.  
  73.  
  74.